index.js
zzmq.dev@gmail.com[dev3]/mathkit[add-median-numbers-function-returns] / index.js
@ af4e36ae
Download
Ladder Summary
Exports the sum utility and re‑exports various math helper functions (isOdd, isEven, min, isPrime, and the newly added factorial) from their respective modules, providing a single entry point for the library.
export function sum(...numbers) {
return numbers.reduce((total, n) => total + n, 0);
}
export { isOdd } from "./src/isOdd.js";
export { isEven } from "./src/isEven.js";
export { min } from "./src/min.js";
export { isPrime } from "./src/isPrime.js";
+export { factorial } from "./src/factorial.js";